package org.ats.http;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

import org.apache.http.client.methods.HttpRequestBase;

public abstract class AtsHttp extends Thread {

	public static interface CallBackDataListener {
		void onPostExecute(int id, String data);

		void onError(int id, Exception ex);
	}

	protected boolean running = false;

	public static MessageDigest getMessageDigest() throws NoSuchAlgorithmException
	{
		return MessageDigest.getInstance("SHA-1");
	}
	public void shutdown() {
		running = false;
	}

	abstract void updataRx(int v);

	abstract public long getRx(int v);

	abstract void updataTx(int v);

	abstract public long getTx(int v);
	
	abstract void setHeader(final HttpRequestBase hrb);

	abstract void networkExchange();

}
